You are here: Statements and Functions > Ent()
Syntax samples
ENT(<entity name-index number>)
SEND 10 ENT(Var1) TO Loc1
DISPLAY "Ent A has been combined with" $ ENT(Var1)
Converts a name-index number or integer to an entity name. Use this function when a statement or function needs the name of an entity whose name index number is stored in an attribute, variable, or some other expression. ENT() can also be used to vary the entity that a statement references by using an expression for the name-index number. When used in an expression expecting a string, such as in the second syntax example above, ProModel will convert the name-index number to the actual name of the entity.
Any logic where an entity name is normally used.
Components
<entity name-index number>
The name-index number of the entity desired. This component may be an expression which allows the referenced entity to change as the simulation progresses. Real numbers will be treated as integers.
Example
The logic below orders three batches of five different entity types to a location, Receiving.
Var1 = 1
WHILE Var1 <= 3 DO
BEGIN
ORDER 5 ENT(Var1) TO Receiving
INC Var1
END
LOC(), RES(), ENTITY(), and LOCATION().